import { CustomEnum, AuthButtonInTable, Dialog } from 'custom/index'

export default class PageListAuthButtonInTable extends AuthButtonInTable {
  public static name: CustomEnum = 'PageListAuthButtonInTable';

  editRow<T extends Dialog>(dialog: T | Function ) {
    this.action(({ _c, props }) => {
      _c.dispatch('ListPage', 'editRow', dialog, props.row)
    })
    return this
  }

  end() {
    return this.upto('ListPageAuthColumn')
  }
}
